<?php
	require_once("global.php");
	require_once("modules/security_mod.php");
	require_once("alerter/modules/account_mod.php");
	require_once("alerter/modules/alert_mod.php");

	SecurityMod::login();

	$level = $_SESSION["account"]->getLevel();
	if ($level != "Admin" && $level != "AlertUser")
		SecurityMod::logout();
	
	$alert = AlertMod::getManualAlertById(v($_REQUEST, "id"));
	$alerterAccount = AlertAccountMod::getAccountById($alert->getAlerterID());
	$alertType = AlertMod::getManualAlertTypeById($alert->getAlertType());
	

?>
<html>
<head>
<title><?php echo(SettingsMod::PAGE_TITLE." :: Manual Alert"); ?></title>
<link rel="stylesheet" href="main.css">
</head>
<body>
	<h2 align="center">Manual Alert</h2>
	<table width="500px" background="<?php echo(SettingsMod::STATIC_IMAGES)?>/bgd.gif" class="messagestyle" align="center">
		<tr>
			<th>Alert type:</th>
			<td><?php echo($alertType); ?>	</td>
		</tr>
		<tr>
			<th>Alert submitter:</th>
			<td><?php echo($alerterAccount->getName()); ?></td>
		</tr>
		<tr>
			<th>Sector:</th>
			<td><?php echo($alert->getSector()); ?></td>
		</tr>
		<tr>
			<th>Coords:</th>
			<td><?php echo($alert->getCoords()); ?></td>
		</tr>
		<tr>
			<th>Header:</th>
			<td><?php echo($alert->getHeader()); ?></td>
		</tr>
		<tr>
			<th>Details:</th>
			<td><?php echo($alert->getDetail()); ?></td>
		</tr>
	</table>
</body>
</html>